<admintpl file="header"/>
<body class="J_scroll_fixed">
<div class="wrap J_check_wrap">
  <ul class="nav nav-tabs">
     <li class="active"><a href="{:U('schedule/index')}">球队日程</a></li>
  </ul>
		<form class="well form-search" method="post" action="{:U('schedule/index')}">
			<div class="search_type cc mb10">
				<div class="mb10">
					<span class="mr20">
					比赛状态：
					<select name="status" class="normal_select index_select"> 
							<option value="0">全部</option>   
							<option value="200" <if condition="$formpost['noup'] eq '200'">selected="selected"</if>>正常</option> 
							<option value="100" <if condition="$formpost['noup'] eq '100'">selected="selected"</if>>已取消</option>  
						</select>
	           		比赛时间：
						<input type="text" name="start_time" value="{$formpost.start_time}" class="J_date" style="width: 80px;">~
						<input type="text" name="end_time" value="{$formpost.end_time}" class="J_date" style="width: 80px;"> &nbsp; &nbsp;
						<input type="submit" class="btn btn-primary" value="搜索" />
						<if condition="$num neq 0">
							共有 {$num} 条相关记录
						</if>
					</span>
				</div>
			</div>
		</form>
   <div class="table_list">
      <div class="p10"><div class="pages"> {$Page} </div> </div>
      <table width="100%" class="table table-hover">
        <thead>
          <tr>
            <th width="60">id</th>
            <th width="130">主队</th>
            <th width="130">客队</th>
            <th width="40">比分</th>
            <th width="60">参赛人数</th>
            <th>赛事简介</th>
            <th>比赛地点</th>
            <th width="60">赛程状态</th>
            <th width="100">已修改-可修改</th>
            <th width="200">ID：用户昵称</th>
            <th width="120">比赛时间</th>
            <th width="60">查看赛况</th>
          </tr>
        </thead>
        <tbody>
        <foreach name="tmatchinfos" item="tmatch">
          <tr>
          	<td>{$tmatch.id}</td>
        	<td>
        		<foreach name="teams" item="team1">
	          	<if condition="$tmatch['teamid1'] eq $team1['id']">
		    		{$team1.teamname}
				</if>
		    	</foreach>
        	</td>
        	<td>
            	<if condition="$tmatch['teamid2']">
            		<foreach name="teams" item="team2">
		          	<if condition="$tmatch['teamid2'] eq $team2['id']">
			    		{$team2.teamname}
					</if>
			    	</foreach>
            	<else />
            	{$tmatch.teamname2}
	    		</if>
        	</td>
        	<td>
            	<if condition="$tmatch['score1'] && $tmatch['score2']">
            	{$tmatch.score1} : {$tmatch.score2}
            	<else />
            	未比赛
	    		</if>
        	</td>
            <td>{$tmatch.play_type}</td>
	        	<td>{$tmatch.description|msubstr=0,32}</td>
            <td>{$tmatch.fieldname}</td>
            <td>
	    		<if condition="$tmatch['status'] eq 200">
	    			正常
	    		<else />
	    			已取消
	    		</if>
            </td>
            <td>
            	<if condition="$tmatch['update_cnt'] && $tmatch['update_max']">
            	{$tmatch.update_cnt} - {$tmatch.update_max}
	    		</if>
            </td>
            <td>{$tmatch.userid}:
        		<foreach name="users" item="user">
					<if condition="$user['id'] eq $tmatch['userid']">
						{$user.nickname}
		        	</if>
            	</foreach>
            </td>
            <td>{$tmatch.matchdatetime}</td>
            <td>
							<a href="{:U('schedule/look',array('id'=>$tmatch['id']))}">赛况信息</a>
            </td>
          </tr>
         </foreach>
        </tbody>
        <thead>
          <tr>
            <th width="60">id</th>
            <th width="130">主队</th>
            <th width="130">客队</th>
            <th width="40">比分</th>
            <th width="60">参赛人数</th>
            <th>赛事简介</th>
            <th>比赛地点</th>
            <th width="60">赛程状态</th>
            <th width="100">已修改-可修改</th>
            <th width="200">ID：用户昵称</th>
            <th width="120">比赛时间</th>
            <th width="60">查看赛况</th>
          </tr>
        </thead>
      </table>
      <div class="p10"><div class="pages"> {$Page} </div> </div>
   </div>
</div>
<script type="text/javascript" src="__ROOT__/statics/js/common.js"></script>
</body>
</html>